<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core">
    <h:body>
    	<ui:composition template="./templates/framework.xhtml">
			<ui:define name="content">
				<div id="multiPartContainer">
					<div class="multiPart" id="partAddEntry">
						<ui:include src="./templates/header.xhtml">
							<ui:param name="text" value="#{i18n['entry.back']}" />
							<ui:param name="link" value="index.xhtml" />
						</ui:include>
						<h:form id="addEntryForm" styleClass="primary">
							<h:inputHidden id="itemId" value="#{addEntryBean.itemId}" />
							<ui:include src="./templates/item-mask.xhtml" />
							<div class="buttons">
								<ui:fragment rendered="#{sessionBean.getKeeBookAccess('READ_WRITE')}">
									<h:commandButton type="submit" value="#{i18n['entry.update']}" action="#{addEntryBean.update}" tabindex="7" />
								</ui:fragment>
								<input type="button" value="#{i18n['generic.cancel']}" onclick="location.href='index.xhtml'" tabindex="9" style="#{not sessionBean.getKeeBookAccess('READ_WRITE') ? 'margin-left:130px' : ''}" />
							</div>
						</h:form>
					</div>
					<div class="multiPart" id="partGeneratePassword">
						<ui:include src="./templates/header.xhtml">
							<ui:param name="text" value="#{i18n['generic.back']}" />
							<ui:param name="scroll" value="partAddEntry" />
						</ui:include>
						<ui:include src="./templates/password-generator.xhtml" />
					</div>
				</div>
			</ui:define>
		</ui:composition>
    </h:body>
</html>